class Dog{
    public String name;
    public int age;
    public void eat(){
        System.out.println("正在吃狗粮....");
    }
}
public class Test {
    public static void main(String[] args) {
        Dog dog=new Dog();//实例化对象
        dog.name="阿财";
        dog.age=5;
        dog.eat();
        System.out.println(dog.name);
        System.out.println(dog.age);
    }
}
/*class WashMachine{
    public String brand; // 品牌
    public String type; // 型号
    public double weight; // 重量
    public double length; // 长
    public double width; // 宽
    public double height; // 高
    public String color; // 颜色
    public void washClothes(){ // 洗衣服
        System.out.println("洗衣功能");
    }
    public void dryClothes(){ // 脱水
        System.out.println("脱水功能");
    }
    public void setTime(){ // 定时
        System.out.println("定时功能");
    }
}*/

/*class Test{
    public String toString() {
        System.out.print("aaa");
        return "bbb";
    }
}

public static void main(String[] args) {
    Test test = new Test();
    System.out.println(test);
}*/
/*
public class Data {

//    public static void main(String[] args) {
        */
/*Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int x = scanner.nextInt();
            int y = scanner.nextInt();
            Data data = new Data(x, y);
            System.out.println(data.getX() + data.getY());*//*

static int cnt = 6;
    static{
        cnt += 9;
    };
    public static void main(String[] args){
        System.out.println("cnt = " + cnt);
    }
    static{
        cnt /=3;
    };
}




*/
/*
class Data {

    public int x;
    public int y;

    public Data(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return x;
    }

   public int getY() {
        return y;
    }

}*/

